Skip to content

fix(homepage): fix missing translations for homepage card widgets#3575

Open
debsmita1 wants to merge 4 commits into
redhat-developer:mainfrom
debsmita1:homepage-missing-translations
Open

fix(homepage): fix missing translations for homepage card widgets#3575
debsmita1 wants to merge 4 commits into
redhat-developer:mainfrom
debsmita1:homepage-missing-translations

Conversation

@debsmita1

@debsmita1 debsmita1 commented Jun 25, 2026

Copy link
Copy Markdown
Member

Hey, I just made a Pull Request!

Resolves:
https://redhat.atlassian.net/browse/RHDHBUGS-3271

Screen.Recording.2026-06-25.at.4.26.37.PM.mov

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app

rhdh-gh-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
app-legacy workspaces/homepage/packages/app-legacy none v0.0.0
@red-hat-developer-hub/backstage-plugin-homepage workspaces/homepage/plugins/homepage patch v1.15.0

@debsmita1 debsmita1 force-pushed the homepage-missing-translations branch from 6cbef86 to d0298b1 Compare June 25, 2026 14:05
@debsmita1 debsmita1 force-pushed the homepage-missing-translations branch from d0298b1 to 1c6b97e Compare June 25, 2026 14:24
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 58.03571% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.11%. Comparing base (d69d6d6) to head (992648a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3575      +/-   ##
==========================================
- Coverage   54.28%   54.11%   -0.18%     
==========================================
  Files        2347     2301      -46     
  Lines       89650    87955    -1695     
  Branches    25020    24541     -479     
==========================================
- Hits        48666    47594    -1072     
+ Misses      39456    38797     -659     
- Partials     1528     1564      +36     
Flag Coverage Δ *Carryforward flag
adoption-insights 83.70% <ø> (ø) Carriedforward from d698e30
ai-integrations 68.16% <ø> (-0.19%) ⬇️ Carriedforward from d698e30
app-defaults 69.79% <ø> (ø) Carriedforward from d698e30
augment 46.39% <ø> (ø) Carriedforward from d698e30
boost 73.96% <ø> (-0.73%) ⬇️ Carriedforward from d698e30
bulk-import 72.46% <ø> (ø) Carriedforward from d698e30
cost-management 14.10% <ø> (ø) Carriedforward from d698e30
dcm 61.70% <ø> (-0.11%) ⬇️ Carriedforward from d698e30
extensions 61.53% <ø> (ø) Carriedforward from d698e30
global-floating-action-button 71.18% <ø> (ø) Carriedforward from d698e30
global-header 59.71% <ø> (ø) Carriedforward from d698e30
homepage 50.51% <58.03%> (+0.28%) ⬆️
install-dynamic-plugins 56.77% <ø> (ø) Carriedforward from d698e30
konflux 91.49% <ø> (ø) Carriedforward from d698e30
lightspeed 68.58% <ø> (-0.24%) ⬇️ Carriedforward from d698e30
mcp-integrations 85.46% <ø> (ø) Carriedforward from d698e30
orchestrator 38.30% <ø> (-1.18%) ⬇️ Carriedforward from d698e30
quickstart 63.76% <ø> (-1.87%) ⬇️ Carriedforward from d698e30
sandbox 79.56% <ø> (ø) Carriedforward from d698e30
scorecard 83.96% <ø> (+1.29%) ⬆️ Carriedforward from d698e30
theme 61.26% <ø> (ø) Carriedforward from d698e30
translations 7.25% <ø> (ø) Carriedforward from d698e30
x2a 78.68% <ø> (ø) Carriedforward from d698e30

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d69d6d6...992648a. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@debsmita1 debsmita1 force-pushed the homepage-missing-translations branch from 32935be to 31e45c4 Compare June 29, 2026 16:30
@debsmita1 debsmita1 force-pushed the homepage-missing-translations branch from 31e45c4 to d698e30 Compare June 29, 2026 16:30
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@debsmita1 debsmita1 requested a review from teknaS47 July 3, 2026 16:22

@its-mitesh-kumar its-mitesh-kumar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @debsmita1, nice work on the i18n coverage and tests!

Two concerns about the updateWidgetComponentData approach:

  1. Coupling to Backstage internals — We're directly mutating __backstage_data, an undocumented internal of @backstage/core-plugin-api. If upstream renames/restructures this, our translations silently break with zero errors.

  2. Magic string syncwidgetTranslationKeysByName maps names like 'Red Hat Developer Hub - Onboarding' to translation keys. These must stay manually in sync with params.name in homePageCards.tsx. A rename = silent i18n breakage.

Upstream proposal: The root cause is HomePageWidgetBlueprint only accepts plain string for title. Could we push upstream for a titleKey/descriptionKey field, where the renderer just calls t(titleKey) at render time? No internals mutation needed:

// Proposed upstream API
HomePageWidgetBlueprint.make({
  params: {
    titleKey: 'recentlyVisited.title',
    descriptionKey: 'recentlyVisited.description',
  }
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants